﻿using Application.CFSKService;
using Application.CFTKService;
using Application.CMKService;
using Application.CPCService;
using Application.EIService;
using Application.EMRService;
using Application.ERService;
using Application.SSDService;
using AppService.CFFKService;
using AppService.CM2Service;
using AppService.CMService;
using AutoMapper;
using Domain.Entity;
using Domain.Entity.Fy;
using Microsoft.AspNetCore.Mvc;

namespace UI7_2.Controllers
{
	public class EIController : Controller
	{
		private readonly IMapper mapper;
		private readonly ILogger<HomeController> _logger;
		private readonly ICFFKService icffkService;
		private readonly ICFSKService icfskService;
		private readonly ICFTKService icftkService;

		private readonly ICMKService icmkService;
		private readonly ICMService icmService;
		private readonly ICM2Service icm2Service;
		private readonly ICPCService icpcService;
		private readonly ISSDService issdService;
		private readonly IEMRService eMRService;
		private readonly IEIService eIService;
		private readonly IERService eRService;

		public EIController(ILogger<HomeController> logger, ICFFKService icffkService, ICFSKService icfskService, IMapper mapper, ICFTKService icftkService, ICMKService icmkService, ICMService icmService, ICM2Service icm2Service, ICPCService icpcService, ISSDService issdService, IEMRService eMRService, IEIService eIService, IERService eRService)
		{
			_logger = logger;
			this.icffkService = icffkService;
			this.icfskService = icfskService;
			this.mapper = mapper;
			this.icftkService = icftkService;
			this.icmkService = icmkService;
			this.icmService = icmService;
			this.icm2Service = icm2Service;
			this.icpcService = icpcService;
			this.issdService = issdService;
			this.eMRService = eMRService;
			this.eIService = eIService;
			this.eRService = eRService;
		}
		#region 面试结果登记表
		//面试结果登记表
		public IActionResult EI()
		{
			return View();
		}
		//面试筛选
		public IActionResult EISX()
		{
			return View();
		}
		//面试结果登记表添加
		public async Task<bool> AddEI(EIDto eIDto)
		{
			return await eIService.AddEI(eIDto);
		}
		
        //查EI全部
        public List<EI> GetEI()
        {
            return eIService.GetEI();
        }
		#endregion
		//更改面试管理筛选的建议录用的操作
		public Task<bool> UpdateCheckStatus(EIDto eIDto)
		{
			return eIService.UpdateEICheckStatus(eIDto);
		}
		public IAMFy SelectEIFy(int currentPage, int pageSize, string? checkStatus)
		{
			return eIService.GetEIFY(currentPage, pageSize, checkStatus);
		}
		public Task<bool> DeleteEI(int id)
		{
			return eIService.DeleteEI(id);
		}
		public Task<bool> UpdateEI(EIDto iDto)
		{
			return eIService.UpdateEI(iDto);
		}
		public IAMFy GetEIFYPassPassComment(int currentPage, int pageSize, string PassPassComment)
		{
			return eIService.GetEIFYPassPassComment(currentPage, pageSize, PassPassComment);
		}
		public IAMFy GetEIFYTongyi(int currentPage, int pageSize, string PassPassComment)
		{
			return eIService.GetEIFYTongyi(currentPage, pageSize, PassPassComment);
		}
	}
}
